home *** CD-ROM | disk | FTP | other *** search
- // AKUA Protos OneFile
- #include "yLibCfg.h"
-
- #include "Reaper.h"
-
- #include "yAgtINIT.h"
- #include "yAgtTRAP.h"
- #include "yDraw.h"
- #include "yFixedMath.h"
- #include "yGlobal.h"
- #include "yString.h"
-
- #include <Appearance.h>
-
-
-
- //
- // For PPC Code resource
- #if ISAPPC
- ProcInfoType __procinfo = bpiObjAgt;
- #endif // ISAPPC
-
-
- // AKUA Statics Beg
- oaVal main(oaObj initBlkObj);
- // AKUA Statics End
-
-
-
-
- oaVal main(oaObj initBlkObj)
- {
- initBlk init = (initBlk)initBlkObj;
-
- if (init->versCompat > kvrInitBlkCompat)
- return 50;
-
- EnterCodeRsrc();
-
- // Check our gestalt selector
- long dummy;
- yError err = gestaltDupSelectorErr; // Already installed
-
- if (!Gestalt(igsReaper, &dummy))
- goto deadlyError;
-
- err = noErr;
-
- // bkkEternal - since we stay resident, load and detach 'PREF' resource
- init->flags = bkkPrefLoad | bkkPrefDetach;
-
- // Just for kicks
- Point p;
- mcPtX(p) = 64;
- mcPtY(p) = 32;
- msLocSet(p);
-
- // Show our icon, get prefs
- CallObjAgt(init->kickAgt, init);
-
- // Pass on ptr to LMGetFCBSPtr()
- if (UInt32 * badguy = fcGet())
- init->trapData = fcIsPatchable(badguy) ? badguy : NULL;
-
- deadlyError:
- LeaveCodeRsrc();
- return err;
- }
-
-
- #include "msLoc.c"